Technical Q&A TB36
The Improper use of FSClose

Q When running an application, I launch a second application. When I quit the first application, the second application quits and the Finder reports that "the server that contains it has been disconnected". Both applications are on local volumes. What's going on?

A The most likely reason for this is that the Resource Manager's tables have become corrupted. One way to trigger this is to call OpenResFile (to read a preferences file, for instance) and then incorrectly call FSClose to close the preferences file instead of correctly calling CloseResFile.

Along the same lines, make sure that you do not substitute a call to DisposeHandle when you should call ReleaseResource.

[Feb 10 1998]


Developer Documentation | Technical Notes | Development Kits | Sample Code